package com.bootdo.per.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.common.utils.Query;
import com.bootdo.per.dao.PersonDao;
import com.bootdo.per.domain.PersonDO;
import com.bootdo.per.domain.TeamDO;
import com.bootdo.per.service.PersonService;
import com.bootdo.system.domain.UserDO;



@Service
public class PersonServiceImpl implements PersonService {
	@Autowired
	private PersonDao scoreDao;
	
	@Override
	public PersonDO get(Long id){
		return scoreDao.get(id);
	}
	
	@Override
	public List<PersonDO> list(Map<String, Object> map){
		return scoreDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return scoreDao.count(map);
	}
	
	@Override
	public int save(PersonDO score){
		return scoreDao.save(score);
	}
	
	@Override
	public int update(PersonDO score){
		return scoreDao.update(score);
	}
	
	@Override
	public int remove(Long id){
		return scoreDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return scoreDao.batchRemove(ids);
	}

	@Override
	public List<PersonDO> listByGroup(Query query) {
		// TODO Auto-generated method stub
		return scoreDao.listByGroup(query);
	}

	@Override
	public int listByGroupCount(Query query) {
		// TODO Auto-generated method stub
		return scoreDao.listByGroupCount(query);
	}

	@Override
	public int saveList(List<PersonDO> list) {
		// TODO Auto-generated method stub
		return scoreDao.saveList(list);
	}

	@Override
	public int updateList(List<PersonDO> list) {
		// TODO Auto-generated method stub
		return scoreDao.updateList(list);
	}


	@Override
	public List<Map<String, Object>> getPersonResult(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return scoreDao.getPersonResult(map);
	}

	/**
	 * 根据年份得到所有人的用户名
	 */
	@Override
	public List<String> getPersonByYear(Integer year) {
		return scoreDao.getPersonByYear(year);
	}

	/**
	 * 得到所有人的12个月的分数
	 */
	@Override
	public List<PersonDO> listAllScore(String userName) {
		return scoreDao.listAllScore(userName);
	}

	/**
	 * 根据根据部门或评分人和年份得到所有人的用户名得到所有人的用户名
	 */
	@Override
	public List<String> getPersonByDeptAndSys(Map<String,Object> map) {
		return scoreDao.getPersonByDeptAndSys(map);
	}

}
